/**
 * @Title: Constants.java
 * @Package cn.com.ytst.data.integration.util
 * @Description:
 * @author 123774135@qq.com
 * @date 2019年1月29日 下午1:11:22
 * @version V1.0
 */
package cn.com.ytst.data.integration;

/**
 * @ClassName: Constants
 * @Description:
 * @author 123774135@qq.com
 * @date 2019年1月29日 下午1:11:22
 *
 */
public class CommonKey {


    /********************************************FTP******************************************************/
    public static final String FTP_HOST_TAG = "job.content[0].ftp.parameter.host";
    public static final String FTP_USERNAME_TAG = "job.content[0].ftp.parameter.username";
    public static final String FTP_PWD_TAG = "job.content[0].ftp.parameter.password";
    public static final String FTP_PORT_TAG = "job.content[0].ftp.parameter.port";
    public static final String FTP_REMOTEPATH_TAGE = "job.content[0].ftp.parameter.remotepath[0]";
    public static final String FTP_LOCALPATH_TAG = "job.content[0].ftp.parameter.localpath";
    public static final String FTP_SYSTEM_TAG = "job.content[0].ftp.parameter.system";
    public static final String FTP_NAME_TAG = "job.content[0].ftp.name";
    public static final String FTP_CORN_TAG = "job.content[0].cronexpress";
    public static final String FTP_SYNC_TYPE = "job.content[0].ftp.parameter.syncType";
    public static final String FTP_SPLITFORMATE_TAG = "job.content[0].ftp.parameter.splitformate";


    /********************************************HTTP******************************************************/
    public static final String MESSAGEBODY_TAG = "Message.MessageBody";
    public static final String TOPIC_TAG = "job.content[0].kafka.topic";
    public static final String KEY_TAG = "job.content[0].kafka.key";
    public static final String HTTP_URL = "job.content[0].reader.attribute.url";
    public static final String HTTP_FORM_FRAMTE = "job.content[0].reader.attribute.formframte";
    public static final String HTTP_METHOD = "job.content[0].reader.attribute.method";
    public static final String HTTP_IS_BATCH = "job.content[0].reader.attribute.is_batch";
    public static final String HTTP_NAME_TAG = "job.content[0].reader.attribute.name";
    public static final String HTTP_PARAMETERS = "job.content[0].reader.parameters";
    public static final String HTTP_CORN_TAG = "job.content[0].reader.attribute.cronexpress";
    public static final String HTTP_SYSNAME = "job.content[0].reader.attribute.sysname";
    public static final String HTTP_PAGESIZE = "job.content[0].reader.attribute.page_size";

    public static final String HTTP_TABLE_NAME = "job.content[0].reader.attribute.table_name";
    public static final String HTTP_SYNC_TYPE = "job.content[0].reader.attribute.syncType";
    /********************************************HTTP******************************************************/
    
    /********************************************HTTPserver******************************************************/
   
    
    public static final String HTTP_SERVER_URL = "job.content[0].httpserver.url";
    public static final String HTTP_SERVER_METHOD = "job.content[0].httpserver.method";
    public static final String HTTP_SERVER_REMOTEURL = "job.content[0].httpserver.remoteurl";
    public static final String HTTP_SERVER_NAME_TAG = "job.content[0].httpserver.name";
    public static final String HTTP_SERVER_SERVICECODE_TAG = "job.content[0].httpserver.servicecode";
    public static final String HTTP_SERVER_SYSNAME = "job.content[0].httpserver.sysname";
    
    public static final String HTTP_SERVER_AIRPORT = "job.content[0].httpserver.airport";
   
    /********************************************HTTPserver******************************************************/


    /********************************************WEBSERVICE******************************************************/
    public static final String WS_NAME = "job.content[0].ws.name";
    public static final String WS_URL = "job.content[0].ws.wsdlurl";
    public static final String WS_METHODNAME_TAG = "job.content[0].ws.methodname";
    public static final String WS_TABLE_NAME = "job.content[0].ws.table_name";
    public static final String WS_SYSNAME = "job.content[0].ws.sysname";
    public static final String WS_AIRPORT = "job.content[0].ws.airport";
    public static final String WS_CORN_TAG = "job.content[0].cronexpress";
    public static final String HEADER_PLUG_TAG = "job.content[0].ws.pluging";
    public static final String WS_SYNCTYPE = "job.content[0].ws.synctype";
    /********************************************WEBSERVICE******************************************************/
    
    
    /********************************************DBREADER******************************************************/
    public static final String DB_READER_USERNAME_TAG = "job.content[0].reader.parameter.username";
    public static final String DB_READER_JDBCURL_TAG = "job.content[0].reader.parameter.connection[0].jdbcUrl[0]";
    public static final String DB_READER_PASSWORD_TAG = "job.content[0].reader.parameter.password";
    public static final String DB_READER_QUERYSQl_TAG = "job.content[0].reader.parameter.connection[0].querySql[0]";
    public static final String DB_READER_TASK_NAME_TAG = "job.content[0].taskname";
    public static final String DB_READER_SCHEMA_TAG = "job.content[0].reader.schema";
    public static final String DB_READER_AIRPORT_TAG = "job.content[0].reader.airport";
    public static final String DB_READER_SYSNAME_TAG = "job.content[0].reader.sysname";
    public static final String DB_READER_TABLENAME_TAG = "job.content[0].reader.tablename";
    /********************************************DBREADER******************************************************/


    /********************************************FILEEADER******************************************************/

    public static final String FILE_READER_NAME_TAG = "job.content[0].reader.attribute.name";
    public static final String FILE_READER_CLASS_NAME_TAG = "job.content[0].reader.attribute.classname";
    public static final String FILE_READER_DATASPLIT_TAG = "job.content[0].reader.attribute.datasplit";
    public static final String FILE_READER_PLUGINJAR_TAG = "job.content[0].reader.attribute.pluginjar";
    public static final String FILE_READER_CRONEXPRESS_TAG = "job.content[0].reader.attribute.cronexpress";
    public static final String FILE_READER_SCANPACKAGE_TAG = "job.content[0].reader.attribute.scanpackage";
    public static final String FILE_READER_FILEPATH_TAG = "job.content[0].reader.parameter.filepath";
    public static final String FILE_READER_DATAENCODE_TAG = "job.content[0].reader.parameter.dataencode";
    public static final String FILE_READER_JOBNAME_TAG = "job.content[0].reader.parameter.jobname";
    /********************************************FILEREADER******************************************************/



    public static final String DATA_PARK_TOTAL_TAG = "data.park_total";

    public static final String DATA_RECORDS_TAG = "data.records";

    public static final String DATA_TOTAL_TAG = "data.total";

    public static final String PER_PAGE_TAG = "per_page";

    public static final String COLUMN_TAG = "column";

    public static final String PAGE_TAG = "page";

    public static final String CACHE_TAG = "avro";

    public static final String PARK_CODE_TAG = "park_code";

    public static final String CACAHE_KEY = PARK_CODE_TAG;
    
    public static final String TOKEN_KEY = "token";
    public static final String SEESION_KEY = "sessionid";


    /***********************************mq********************************************************/

    public static final String MQ_PLUGINNAME_TAG = "job.content[0].reader.name";
    public static final String MQ_PORT_TAG = "job.content[0].reader.parameter.port";
    public static final String MQ_ENCRYPT_TAG = "job.content[0].reader.attribute.encrypt";

    public static final String MQ_SCHEMA = "job.content[0].reader.attribute.schema";
    
    public static final String MQ_DATA_TRANS_TAG = "job.content[0].reader.attribute.datatype";

    public static final String MQ_USERNAME_TAG = "job.content[0].reader.parameter.username";

    public static final String MQ_PWD_TAG = "job.content[0].reader.parameter.password";

    public static final String MQ_QUEUE_TAG = "job.content[0].reader.parameter.queue";
    
    public static final String MQ_TAGS_TAG = "job.content[0].reader.parameter.tags";

    public static final String MQ_HOST_TAG = "job.content[0].reader.parameter.host";

    public static final String MQ_TYPE_TAG = "job.content[0].reader.attribute.mqtype";
    public static final String MQ_IS_BATCH = "job.content[0].reader.attribute.is_batch";
  
    public static final String MQ_TABLE_NAME = "job.content[0].reader.attribute.table_name";

    /************************************rabbitmq********************************************************/


    /**************************************************db***************************************************/

    public static final String DBWRITE_USERNAME_TAG = "job.content[0].dbwrite.parameter.dbusername";
    public static final String DBWRITE_PWD_TAG = "job.content[0].dbwrite.parameter.dbpassword";
    public static final String DBWRITE_TABLE_TAG = "job.content[0].dbwrite.parameter.table";
    public static final String DBWRITE_URL_TAGE = "job.content[0].dbwrite.parameter.url";
    public static final String DBWRITE_CLONUMS_TAG = "job.content[0].dbwrite.parameter.clonums";
    public static final String DBWRITE_DBTYPE_TAG = "job.content[0].dbwrite.dbtype";
    public static final String DBWRITE_DBNAME_TAG = "job.content[0].dbwrite.dbname";
    /****************************************************db*******************************************************/
    
    
    /**************************************************kafkawrite**********************************************************/
    public static final String KAFAK_WRITER_BOOTSTRAPSERVERS_TAG = "job.content[0].writer.parameter.bootstrapservers";
    public static final String KAFAK_WRITER_TOPIC_TAG = "job.content[0].writer.parameter.topic";
    public static final String KAFAK_WRITER_KEY_TAG = "job.content[0].writer.parameter.key";
    public static final String KAFAK_WRITER_ATTRUE_TAG = "job.content[0].writer.parameter.attrue";
    public static final String KAFAK_WRITER_TABLENAME_TAG = "job.content[0].writer.parameter.tablename";
    public static final String KAFAK_WRITER_AIRPORT_TAG = "job.content[0].writer.parameter.airport";
    public static final String KAFAK_WRITER_SYSNAME_TAG = "job.content[0].writer.parameter.sysname";
    /**************************************************kafkawrite*********************************************************/

    public static final String AVRO_MODEL_AVSC_TAG = "avro_model.avsc";

    public static final String KAFKA_TOPIC_TAG = "job.content[0].kafka.topic";


    public static final String ACTIVEMQ_TAG = "activemq";

    public static final String RABBITMQ_TAG = "rabbitmq";

    public static final String ROCKETMQ_TAG = "rocketmq";

    public static final String KAFKA_TAG = "kafka";

    public static final String SUCCESS_TAG = "0";


    public static final String FAIL_TAG = "1";

    /****************************************************校验唯一性*******************************************************/
    public  static final String NOT_EXIST = "0"; 
	public  static final String EXIST = "1"; 
    //rabbitmq


    public static final String SUCCESS = "SUCCESS";
    public static final String ERROR = "ERROR";

    public enum operType {
        INSERT("新增", "INSERT"), UPDATE("修改", "UPDATE"), DELETE("删除", "DELETE"), SELECT("查询", "SELECT");
        protected String name;
        protected String code;

        private operType(String name, String code) {
            this.name = name;
            this.code = code;
        }

        public String getName() {
            return name;
        }

        protected void setName(String name) {
            this.name = name;
        }

        public String getCode() {
            return code;
        }

        protected void setCode(String code) {
            this.code = code;
        }
    }


    public enum operSource {
        ACTIVEMQ("ACTIVEMQ", "ACTIVEMQ"), HTTP("HTTP", "HTTP"), KAFKA("KAFKA主题", "KAFKA"), WEBSERVICE("web服务", "WEBSERVICE"), DB("数据库", " DB");
        protected String name;
        protected String code;

        private operSource(String name, String code) {
            this.name = name;
            this.code = code;
        }

        public String getName() {
            return name;
        }

        protected void setName(String name) {
            this.name = name;
        }

        public String getCode() {
            return code;
        }

        protected void setCode(String code) {
            this.code = code;
        }
    }

    public enum SyncType {
        INCREMENT("INCREMENT", "1"), TOTALQUANTITY("INCREMENT", "2");
        protected String name;
        protected String code;

        private SyncType(String name, String code) {
            this.name = name;
            this.code = code;
        }

        public String getName() {
            return name;
        }

        protected void setName(String name) {
            this.name = name;
        }

        public String getCode() {
            return code;
        }

        protected void setCode(String code) {
            this.code = code;
        }
    }


}
